﻿using System;
using DC2010.Objects.Base;

namespace DC2010.Objects.Data
{
    [Serializable]
    public class SkillInfo : BaseInfo
    {
        /// <summary>
        /// Level of skill
        /// </summary>
        public long Experience { get; set; }

        /// <summary>
        /// ID of main skill. If this skill is shoot then main skill is Ninja :)
        /// </summary>
        public string MainSkillId { get; set; }

        /// <summary>
        /// values on http://dmweb.free.fr/?q=node/690 are at max 75.
        /// </summary>
        public int HitProbability { get; set; }

        public SkillData CreateData()
        {
            SkillData cd = new SkillData();

            cd.InfoId = Id;
            cd.Id = cd.InfoId + "_" + Guid.NewGuid().ToString();
            //TODO: fill with other properties
            Root.log.InfoFormat("Core, Created new object with id: {0} based on object {1}", cd.Id, cd.InfoId);
            Root.I.SkillSystem.AddData(cd);



            return cd;
        }
    }
}
